<template>
  <div class="tips-box flex flex-js-c screen-width" :class="[module[props.type]]">
    <div class="center-front">
      温馨提示：您当前是游客身份，暂无查看内容的权限，请您先 或 登录 或 注册
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineProps, useCssModule, withDefaults } from 'vue';
import { MessagesType } from '@/common/type';
import { HintCode } from "@/common/utils/enum.ts";

// @ts-ignore
const props = withDefaults(defineProps<MessagesType>(),{
  text: '',
  type: HintCode.SUCCESS,
});

const module = useCssModule('hint');

</script>

<style scoped lang="scss">
.tips-box {
  height: 30Px;
  margin-top: 80Px;
  .center-front {
    padding: 7Px 0;
    text-align: center;
    font-size: 16Px;
    color:#222;
    font-weight: 400;
    font-style: normal;
  }
}
</style>

<style lang="scss" module="hint">
@keyframes ant {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
.success {
  opacity: 0;
  animation: ant .2s forwards;
}
.error {
  background-color: #efefef;
  animation: ant .2s forwards;
}
</style>